Packet switch for interfacing between LAN and WAN

ABSTRACT

A packet switch interfacing between a WAN and a LAN accommodating a terminal includes an address table storing a relation between an address of the terminal and an input port receiving a packet transmitted from the terminal, and an address learning unit for storing in the address table the relation between the source address of the received packet and the input port receiving the received packet. Further the packet switch includes a SW unit for effecting control to transmit the received packet according to whether or not stored in the address table, and then transmit the received packet to the WAN when a packet having a source address identical with the destination address of the received packet has not been received from the LAN.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a packet switch for forwarding a packetto a WAN side and a LAN side.

2. Description of the Related Art

There has been an increase in methods that construct an intra-companywide-area LAN by connecting bases of a company to each other via WANlines and disposing a MAC packet switch at an entry to each of thebases. FIG. 19 is a diagram showing an example of a constructedintra-company wide-area LAN. As shown in FIG. 19, an office LAN 2#i(i=1, 2, . . . ) accommodating terminals such as of personal computersis connected to a MAC packet switch (SW) 4#i (i=1, 2, . . . ). In thiscase, a LAN side interface of the SW 4#i is an Ether or the like. The SW4#i has a plurality of lines on a WAN 6 side. An interface of the SW 4#iwith the WAN 6 side is MAC over ATM for allowing MAC packets to becontained in ATM cells, or the like. The SWs 4#i (i=1, 2, . . . ) of thebases are connected to each other on the WAN 6 side by a mesh, a ring orthe like. The SW 4#i operates as a MAC packet bridge having an addresslearning function.

When a MAC packet is inputted from the office LAN 2#i, the SW 4#iregisters, in a learning table, the source MAC address (source address)of the packet such that the source MAC address is associated with a portwhere the packet is inputted, thereby learning the,MAC address. Inaddition, the SW 4#i constructs a packet from an ATM cell inputted to aWAN port connected to a WAN line, and then registers, in the learningtable, the source MAC address (source address) of the packet such thatthe source MAC address is associated with the input port, therebylearning the MAC address. When receiving a MAC packet from the officeLAN 2#i, the SW 4#i searches the learning table using the destinationMAC address (destination address) of the packet, and then performs thefollowing operation. FIG. 20 is a diagram showing packet forwardingpatterns.

(i) When the destination address of the packet has already been learned,and a port corresponding to the destination address is not the inputport of the packet and is a LAN port, the SW 4#i forwards the packetonly to the corresponding port as shown in No. 8 in FIG. 20.

(ii) When the destination address of the packet has already beenlearned, and a port corresponding to the destination address is not theinput port of the packet and is a WAN port, the SW 4#i converts thepacket into an ATM cell, and then forwards the ATM cell to thecorresponding WAN port as shown in No. 3 in FIG. 20.

(iii) When the destination address of the packet has already beenlearned, and a port corresponding to the destination address is the sameas the input port of the packet, the SW 4#i discards the packet as shownin No. 2 in FIG. 20.

(iv) When the destination address of the packet has not been learned,the SW 4#i forwards the packet to all ports accommodating LAN interfacesother than the input port of the packet and to ports on the WAN 6 sideas shown in No. 1 in FIG. 20.

Also for a packet inputted to an input port connected to the WAN 6 side,the SW 4#i searches the learning table using the destination address ofthe packet, and then performs the following operation.

(i) When the destination address of the packet has already been learned,and a port corresponding to the destination address is not the inputport of the packet and is a LAN port, the SW 4#i forwards the packet toonly the corresponding port as shown in No. 5 in FIG. 20.

(ii) When the destination address of the packet has already beenlearned, and a port corresponding to the destination address is not theinput port of the packet and is a WAN port, the SW 4#i forwards thepacket to the corresponding WAN port as shown in No. 7 in FIG. 20.

(iii) When a port corresponding to the destination address of the packetis the same as the input port of the cell, the SW 4#i discards thepacket as shown in No. 6 in FIG. 20.

(iv) When the destination address of the packet has not been learned,the SW 4#i forwards the packet to the LAN side ports and the WAN 6 sideports other than the input port of the packet as shown in No. 4, in FIG.20.

A broadcast packet is not learned and is forwarded to all the ports atall times. The conventional switch, however, has the following problem.Since lines on the WAN side are expensive, it is desirable to reducetraffic as much as possible. When a packet whose address has not beenlearned and a broadcast packet flows on the WAN side having a loopconfiguration, packets at the SW 4#i increase, whereby the entirenetwork is paralyzed by congestion. There is a method for preventingthis, which forces a line in a loop state to be disabled using aspanning tree protocol (STP). However, this method lets an expensive WANline idle, and therefore is not economical.

SUMMARY OF THE INVENTION

It is accordingly an object of the present invention to provide a switchthat can reduce the traffic of WAN lines without letting the WAN linesidle.

In accordance with an aspect of the present invention, there is provideda packet switch for interfacing between a WAN and a LAN accommodating aterminal, the packet switch includes an address table for storing arelation between an address of the terminal and an input port receivinga packet transmitted from the terminal, an address learning unit forstoring in the address table the relation between the source address ofthe received packet and the input port receiving the received packet,and an SW unit for effecting control to transmit the received packet toa corresponding output port according to a relation between adestination address of the received packet and the input port when thedestination address is stored in the address table, and effectingcontrol to transmit the received packet to the LAN when the destinationaddress of the received packet is not stored in the address table, andthen transmit the received packet to the WAN when a packet having asource address identical with the destination address of the receivedpacket has not been received from the LAN in a certain time aftertransmitting the received packet to the LAN.

In accordance with another aspect of the present invention, there isprovided a packet switch for interfacing between a WAN and a LANaccommodating a terminal, the packet switch includes an address tablefor storing a correspondence between an address of the terminal and aninput port receiving a packet transmitted from the terminal, an addresslearning unit for not storing. in the address table a source address ofa packet received from the WAN when the source address is stored in theaddress table and an input port corresponding to the source address ison the LAN side, and otherwise storing in the address table a relationbetween a source address of a packet received from the LAN or the WANand an input port receiving the packet, an aging processing unit fordeleting each of the addresses from the address table when there hasbeen no update relating to the address in a certain time, and an SW unitfor effecting control to transmit the packet received from the LAN sideto a corresponding output port according to a relation between adestination address of the packet and the input port when thedestination address is stored in the address table, and discarding thepacket received from the WAN side when the source address of the packetis stored in the address table and the input port corresponding to thesource address of the packet is on the LAN side.

In accordance with a further aspect of the present invention, there isprovided a packet switch for interfacing between a WAN and a LANaccommodating a terminal, the packet switch includes an address tablefor storing a relation between an address of the terminal and an inputport receiving a packet transmitted from the terminal, an addresslearning unit for storing in the address table a relation between asource address of a packet received from the LAN or the WAN and an inputport receiving the packet, a temporary storage memory; and an SW unitfor effecting control to transmit the packet to a corresponding outputport according to a relation between a destination address of the packetand the input port when the destination address of the packet is storedin the address table, storing information on a received packet receivedfrom the LAN in the temporary storage memory when the received packet istransmitted to the WAN, and discarding a received packet received fromthe WAN side when information on the received packet coincides with theinformation stored in the temporary storage memory.

The above and other objects, features and advantages of the presentinvention and the manner of realizing them will become more apparent,and the invention itself will best be understood from a study of thefollowing description and appended claims with reference to the attacheddrawings showing some preferred embodiments of the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram of assistance in explaining principles of thepresent invention;

FIG. 2 is a diagram of a network configuration according to a firstembodiment of the present invention;

FIG. 3 is a block diagram of an SW in FIG. 2;

FIG. 4 is a flowchart of operation of an SW unit in FIG. 3;

FIG. 5 is a flowchart of operation of a MAC address learning unit inFIG. 3;

FIG. 6 is a diagram of a network configuration according to a secondembodiment of the present invention;

FIG. 7 is a block diagram of an SW in FIG. 6;

FIG. 8 is a flowchart of operation of an SW unit in FIG. 7;

FIG. 9 is a diagram of a network configuration according to a thirdembodiment of the present invention;

FIG. 10 is a block diagram of an SW in FIG. 9;

FIG. 11 is a flowchart of operation of an SW unit in FIG. 10;

FIG. 12 is a flowchart of operation of a MAC address learning unit inFIG. 10;

FIG. 13 is a diagram of a network configuration according to a fourthembodiment of the present invention;

FIG. 14 is a block diagram of an SW in FIG. 13;

FIG. 15 is a flowchart of operation of an SW unit in FIG. 14;

FIG. 16 is a diagram of a network configuration according to a fifthembodiment of the present invention;

FIG. 17 is a block diagram of an SW in FIG. 16;

FIG. 18 is a flowchart of operation of an SW unit in FIG. 17;

FIG. 19 is a diagram of a conventional network configuration; and

FIG. 20 is a diagram showing packet forwarding patterns.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Principles of the present invention will be described prior todescription of embodiments of the present invention. FIG. 1 is a diagramof assistance in explaining principles of the present invention. Asshown in FIG. 1, a packet switch 14 for interfacing between a LAN 12accommodating terminals 10 and a WAN 16 is provided with an addresstable 20, an address learning unit 22, and an SW unit 24. The addresstable 20 stores a relation between an address of a terminal 10accommodated in the LAN 12 or a terminal not shown in the figureaccommodated in the WAN 16 and an input port that receives a packettransmitted from the terminal 10 or the like. The address learning unit22 stores in the address table 20 the relation between the sourceaddress of the packet received from the LAN 12 or the WAN 16 and theinput port receiving the packet.

When a destination address of a packet is stored in the address table20, the SW unit 24 effects control to transmit the packet to acorresponding output port according to a relation between thedestination address and the input port. When the destination address ofthe packet is not stored in the address table 20, the SW unit 24transmits the packet to the LAN 12. When a terminal 10 having an addressthat coincides with the destination address set in the packet isaccommodated in the LAN 12, the terminal 10 receives the packet, andthen transmits to the LAN 12 an acknowledging packet formed by settingthe source address of the received packet as a destination address andthe address of the terminal itself as a source address. When a terminal10 having an address that coincides with the destination address set inthe packet is not present, however, no acknowledging packet istransmitted to the LAN 12. When a packet having a source addressidentical with the destination address of the packet transmitted to theLAN 12 is not received, the SW unit 24 effects control to transmit thepacket to the WAN 16 side. Thus, when the destination address of thepacket is not learned, the packet is first transmitted to the LAN 12side, rather than simultaneously flooding the LAN 12 side and the WAN 16side with the packet, and then the packet is transmitted to the WAN 16side when a packet having a source address identical with thedestination address of the packet is not received from the LAN 12. It istherefore possible to control an increase in traffic due to the floodingof the WAN 16 with the packet.

First Embodiment

FIG. 2 is a diagram of a network configuration according to a firstembodiment of the present invention. As shown in FIG. 2, the networkcomprises a plurality of office LANs 50#i (i=1, 2, . . . ), a pluralityof SWs 52#i (i=1, 2, . . . ), and a WAN 54. The office LANs 50#i areLANs such as Ether networks, and each connected to a plurality of portsof an SW 52#i by a plurality of Ether cables. The office LANs 50#i eachinclude a plurality of terminals 60#ijk (j=1, 2, . . . , m, and k=1, 2,. . . ). A terminal 60#ijk is a PC or the like, and transmits andreceives MAC frames (hereinafter referred to as packets) via an Etherinterface. When the terminal 60#ijk receives a packet directed to theterminal itself, the terminal 60#ijk returns an acknowledging packetformed by setting the source address of the received packet as adestination address and the MAC address of the terminal itself as asource address according to an ARP protocol, for example.

FIG. 3 is a block diagram of an SW 52#i in FIG. 2. As shown in FIG. 3,the SW 52#i has a plurality of LAN interface units 70#ij (j=1, 2, . . ., m), a plurality of WAN interface units 72#il (l=1, 2, . . . , p), anSW unit 74#i, a MAC address learning unit 76#i, and a MAC address table78#i. The LAN interface units 70#ij have the following functions. (1) Toreceive a packet from the office LAN 50#i and then output the packet tothe SW unit 74#i. (2) To receive a packet from the SW unit 74#i and thentransmit the packet to the office LAN 50#i. The WAN interface units72#il (l=1, 2, . . . , p) have the following functions. (1) To receiveATM cells, SONET frames, ISDN packets and the like conforming to the WANinterface from the WAN 54 side. (2) To construct received packets of theWAN interface into Ether packets and then output the Ether packets tothe SW unit 74#i. (3) To put Ether packets outputted from the SW unit74#i into packets of the WAN interface and then transmit the packets tothe WAN 54.

FIG. 4 is a flowchart of operation of the SW unit 74#i. The SW unit 74#ireceives a packet from a LAN interface unit 70#ij or a WAN interfaceunit 72#il, and then performs the following processing. At a step S2,the SW unit 74#i extracts a source address of the packet. At a step S4,the SW unit 74#i extracts a destination address of the packet. At a stepS6, the SW unit 74#i outputs the source address of the packet and aninput port number to the MAC address learning unit 76#i, and provides aninstruction to learn the MAC address. At a step S8, the SW unit 74#isearches the MAC address table 78#i for the destination address of thepacket. At a step S1O, the SW unit 74#i determines whether the MACaddress has been learned. When the MAC address has not been learned, theprocessing proceeds to a step S12. When the MAC address has beenlearned, the processing proceeds to a step S18.

At the step S12, the SW unit 74#i floods the office LAN 50#i with thepacket through LAN interface units other than the LAN/WAN interface unitconnected to the port to which the packet has been inputted. The LANside is first flooded, and when a packet having a source addressidentical with the destination address of the packet used for theflooding has not been received, the WAN side is flooded to therebycontrol an increase in traffic on the WAN side. At a step S14, the SWunit 74#i determines whether a packet having a source address identicalwith the destination address of the packet used for the flooding isreceived from the office LAN 50#i. When a packet having a source addressidentical with the destination address of the packet used for theflooding is not received, the processing proceeds to a step S16. Whethera packet having a source address identical with the destination addressof the packet used for the flooding is received, is determined on thebasis of whether a packet having a source address identical with thedestination address of the packet used for the flooding is receivedbefore passage of a certain time after the flooding of the office LAN50#i with the packet. When a packet having a source address identicalwith the destination address of the packet used for the flooding isreceived, the processing is ended. At the step S16, the SW unit 74#ioutputs the packet to WAN interface units other than the WAN interfaceunit that has received the packet.

At the step S18, the SW unit 74#i determines whether a portcorresponding to the destination address is the input port of thepacket. When the corresponding port is different from the input port,the processing proceeds to a step S20. When the corresponding port isthe same as the input port, the processing proceeds to a step S22. Atthe step S20, the SW unit 74#i outputs the packet to a LAN interfaceunit or a WAN interface unit connected to the corresponding output port.At the step S22, the SW unit 74#i discards the packet. FIG. 5 is aflowchart of operation for address learning of the MAC address learningunit 76#i. The MAC address learning unit 76#i performs the followingprocessing for address learning. At a step S40, the MAC address learningunit 76#i receives the source address of a packet and an input portnumber from the SW unit 74#i. At a step S42, the MAC address learningunit 76#i registers the source address, the input port number, and apresent time in the MAC address table 78#i.

The time is registered for aging. Aging deletes the MAC address of aterminal that has not transmitted a packet in a certain time from theMAC address table 78#i to thereby deal with a change in a relationbetween the MAC address and the port due to movement of the terminal orthe like. The MAC address learning unit 76#i also deletes a MAC addressthat predates a certain time which address is registered in the MACaddress table 78#i (aging). The MAC address table 78#i stores the sourceaddress, the input port number, and the latest registered time. The WAN54 in FIG. 2 is a wide area network. An interface for the WAN 54 is MACOVER ATM, ISDN, SONET, Frame Relay or the like. While the WAN 54 is of astar configuration in the first embodiment, the WAN 54 may be of adifferent configuration.

Operation of FIG. 2 will be described in the following.

-   (1) Communication within office LAN 50#1

Suppose that a terminal 60#111 sends a packet having the MAC address ofthe terminal as a source address and the MAC address of a terminal60#121 as a destination address to the office LAN 50#1. The LANinterface unit 70#11 in the SW 52#1 receives the packet, and thenoutputs the packet to the SW unit 74#1. The SW unit 74#1 sends thesource address of the packet and an input port number to the MAC addresslearning unit 76#1. The MAC address learning unit 76#1 registers thesource address, the input port number, and a present time in the MACaddress table 78#1. The SW unit 74#1 searches the MAC address table 78#1for the destination address of the packet to determine whether thedestination address has been learned. When the destination address hasbeen learned, the SW unit 74#1 forwards the packet to the office LAN50#1 through the LAN interface unit 70#12 connected to a portcorresponding to the destination address. When the destination addresshas not been learned, the SW unit 74#1 floods the office LAN 50#1 withthe packet through the LAN interface units 70#1j (j=2, . . . , m) otherthan the LAN interface unit 70#11, and then waits for an acknowledgmentfor a certain period of time.

The terminal 60#121 receives the packet directed to the terminal itself,and then transmits to the office LAN 50#1 an acknowledging packet formedby setting the MAC address of the terminal itself as a source addressand the source address of the packet as a destination address inaccordance with the ARP protocol. The LAN interface unit 70#12 receivesthe acknowledging packet, and then outputs the acknowledging packet tothe SW unit 74#1. Since the source address of the acknowledging packetcoincides with the destination address of the packet transmitted to theoffice LAN 50#1, the SW unit 74#1 discards the packet from the terminal60#111. Thus, when the packet is received in the office LAN 50#1, theWAN 54 is not flooded with the packet, which makes it possible tocontrol an increase in traffic in the WAN 54 due to the flooding. Sincethe destination address of the acknowledging packet is learned by theMAC address table 78#1, the SW unit 74#1 sends the acknowledging packetto the office LAN 50#1 through the LAN interface unit 70#11. Inaddition, the source address of the acknowledging packet is learned bythe MAC address table 78#1.

-   (2) Communication between office LAN 50#1 and office LAN 50#3

Suppose that the terminal 60#111 sends a packet having the MAC addressof the terminal as a source address and the MAC address of a terminal60#311 as a destination address to the office LAN 50#1. The LANinterface unit 70#11 in the SW 52#1 receives the packet, and thenoutputs the packet to the SW unit 74#1. The SW unit 74#1 sends thesource address of the packet and an input port number to the MAC addresslearning unit 76#1. The MAC address learning unit 76#1 registers thesource address and the input port number in the MAC address table 78#1.The SW unit 74#1 searches the MAC address table 78#1 for the destinationaddress of the packet to determine whether the destination address hasbeen learned. When the destination address has been learned, the SW unit74#1 forwards the packet to the WAN 54 side through a WAN interface unitconnected to a port corresponding to the destination address.

When the destination address has not been learned, the SW unit 74#1floods the office LAN 50#1 with the packet through the LAN interfaceunits 70#1j (j=2, . . . , m) other than the LAN interface unit 70#11,and then waits for an acknowledgment for a certain period of time. Sincethe terminal 60#311 is not accommodated in the office LAN 50#1, the SW52#1 cannot receive a packet having a source address identical with thedestination address of the above packet. The SW unit 74#1 floods the WAN54 side with the packet through all the WAN interface units 72#il (l=1,2, . . . ).

The SW 52#2 or the SW 52#4 receives the packet from the WAN 54, and thensearches the MAC address table 78#2 or the MAC address table 78#4 forthe destination address of the packet to determine whether thedestination address has been learned. When the destination address hasnot been learned, the SW 52#2 or the SW 52#4 transmits the packet to theoffice LAN 50#2 or the office LAN 50#4. Since the terminal 60#311corresponding to the destination address is not accommodated in theoffice LAN 50#2 or the office LAN 50#4, an acknowledging packet is notreturned from the office LAN 50#2 or the office LAN 50#4. However, sincethe packet is inputted to one interface with the SW 52#1 on the WAN 54side, the SW 52#2 or the SW 52#4 does not flood the WAN 54 side with thepacket, but discards the packet. The SW 52#2 or the SW 52#4 learns thesource address of the packet.

The SW 52#3 receives the packet from the WAN 54, and then searches theMAC address table 78#3 for the destination address of the packet todetermine whether the destination address has been learned. When thedestination address has not been learned, the SW 52#3 transmits thepacket to the office LAN 50#3. Since the terminal 60#311 correspondingto the destination address is accommodated in the office LAN 50#3, theterminal 60#311 receives the packet from the office LAN 50#3, and thenreturns an acknowledging packet. When the SW 52#3 receives theacknowledging packet, the SW 52#3 discards the packet received from theSW 52#1. The acknowledging packet is received by the SW 52#1 via the WAN54. When the SW 52#1 receives the acknowledging packet, the SW 52#1transmits the acknowledging packet to the office LAN 50#1. Also, the SW52#1 learns the source address of the acknowledging packet in the samemanner as a normal packet. It is to be noted that while the firstembodiment takes an example of not throwing the packet received from theLAN to the WAN, a concept similar to this may be applied so that in astate with a plurality of WAN ports, a packet from the WAN is firstthrown to the LAN side, and the packet is not thrown to the other WANports when a packet having a source address identical with thedestination address of the packet thrown to the LAN side is receivedfrom the LAN side.

Second Embodiment

FIG. 6 is a diagram of a network configuration according to a secondembodiment of the present invention. In the figure, substantially thesame components as the components in FIG. 2 are identified by the samereference numerals. When flooding a WAN 54 side with a packet, an SW100#i according to the second embodiment selects one of a plurality ofWAN lines, and then transmits the packet to the WAN line. When a packethaving a source address identical with the destination address of thepacket transmitted to the WAN line is not received, the SW 100#i selectsone of the other WAN lines, and then transmits the packet to the WANline. The SW 100#i repeats the operation until a packet having a sourceaddress identical with the destination address of the packet transmittedto a WAN line is received. A case for flooding the WAN 54 side issimilar to the case in the first embodiment, that is, a case where thedestination MAC address is not learned and after the office LAN 50#i isflooded with the packet, a packet having a source address identical withthe destination address of the packet used for the flooding is notreceived.

FIG. 7 is a block diagram of an SW 100#i in FIG. 6. In the figure,substantially the same components as the components in FIG. 3 areidentified by the same reference numerals. FIG. 8 is a flowchart ofoperation of an SW unit 120#i in FIG. 7. The SW unit 120#i receives apacket from a LAN interface unit 70#ij or a WAN interface unit 72#il,and then performs the following processing. Processing of steps S60 toS72 and steps S90 to S94 is the same as processing of the steps S2 toS14 and the steps S18 to S22 in FIG. 4. At a step S74, the SW unit 120#idetermines whether there is a WAN line to which the packet is notforwarded. When there is a WAN line to which the packet is notforwarded, the processing proceeds to a step S76. When there is no WANline to which the packet is not forwarded, the processing is ended. Atthe step S76, the SW unit 120#i selects a WAN line. The WAN line isselected on the basis of priorities of the WAN lines or in ascendingorder/descending order of the port number, for example. At a step S78,the SW unit 120#i forwards the packet to the selected WAN line. The SWunit 120#i determines whether a packet having a source address identicalwith the destination address of the packet forwarded to the WAN line isreceived from the WAN line to which the packet is forwarded. When thepacket is received from the WAN line, the processing is ended. When thepacket is not received from the WAN line, the processing returns to thestep S74 to carry out the steps S74 to S80.

Operation of FIG. 6 will be described in the following. Communicationwithin an office LAN 50#1 is the same as in the first embodiment, andtherefore its description will be omitted. Communication between theoffice LAN 50#1 and an office LAN 50#3 will be described. Suppose that aterminal 60#111 sends a packet having the MAC address of the terminal asa source address and the MAC address of a terminal 60#311 as adestination address to the office LAN 50#1. The LAN interface unit 70#11in the SW 100#1 receives the packet, and then outputs the packet to theSW unit 120#1. The SW unit 120#1 searches a MAC address table 78#1 forthe destination address of the packet to determine whether thedestination address has been learned. When the destination address hasbeen learned, the SW unit 120#1 forwards the packet to the WAN 54 sidethrough a WAN interface unit connected to a port corresponding to thedestination address. When the destination address has not been learned,the SW unit 120#1 floods the office LAN 50#1 with the packet through LANinterface units 70#1j (j=2, . . . , m) other than the LAN interface unit70#11, and then waits for an acknowledgment for a certain period oftime.

Since the terminal 60#311 is not accommodated in the office LAN 50#1,the SW 100#1 cannot receive a packet having a source address identicalwith the destination address of the above packet. The SW unit 120#1selects one of the WAN lines to which WAN interface units 72#1j (j=2, 3,4) are connected, or for example a WAN line to which the SW 100#2 isconnected. The SW unit 120#1 forwards the packet to the WAN 54 to whichthe SW 100#2 is connected through the WAN interface unit. When receivingthe packet directed to the terminal 60#311, the SW 100#2 searches a MACaddress table 78#2 for the destination address of the packet todetermine whether the destination address has been learned. When thedestination address has been learned, a port corresponding to thedestination address is learned as a port on the WAN 54 side, butcoincides with the input port. Therefore, the packet is discarded. Whenthe destination address has not been learned, the SW 100#2 floods anoffice LAN 50#2 with the packet. Since the terminal 60#311 is notaccommodated in the office LAN 50#2, the SW 100#2 cannot receive apacket having a source address identical with the destination address ofthe above packet. Since the SW 100#2 is connected only to the SW 100#1via the WAN 54, however, the SW 100#2 does not flood the WAN line withthe packet.

Since the SW 100#1 cannot receive a packet having a source addressidentical with the destination address of the above packet, the SW 100#1selects another WAN line, for example a WAN line connected to the SW100#3. The SW 100#1 forwards the packet to the WAN 54 to which the SW100#3 is connected through the WAN interface unit. When receiving thepacket directed to the terminal 60#311, the SW 100#3 searches a MACaddress table 78#3 for the destination address of the packet todetermine whether the destination address has been learned. When thedestination address has been learned, the SW 100#3 forwards the packetto an office LAN 50#3 through a LAN interface unit 70#31 connected to aport corresponding to the destination address. When the destinationaddress has not been learned, the SW 100#3 floods the office LAN 50#3with the packet. Receiving the packet, the terminal 60#311 transmits anacknowledging packet to the office LAN 50#3. Receiving the acknowledgingpacket having a source address identical with the destination address ofthe packet received by the terminal 60#311, since the SW 100#3 haslearned the destination address of the acknowledging packet, the SW100#3 forwards the acknowledging packet to the SW 100#1 through the WAN54. Receiving the acknowledging packet, the SW 100#1 forwards theacknowledging packet to the office LAN 50#1, and also discards thepacket from the terminal 60#111. Thus, rather than simultaneouslyflooding the WAN 54 side, a WAN line is selected and flooded. Anincrease in traffic due to simultaneous flooding is thereby controlled.

Third Embodiment

FIG. 9 is a diagram of a network configuration according to a thirdembodiment of the present invention. In the figure, substantially thesame components as the components in FIG. 2 are identified by the samereference numerals. When a WAN 152 has a shape of a ring or the like asshown in FIG. 9, a packet transmitted by an SW 150#i to the WAN 152 sidemay circulate around the WAN 152 and return to the SW 150#i itself. Whensuch a circulating packet is transmitted to the WAN 152 side again, thepacket circulates in the endless loop, thus increasing the traffic ofthe WAN 152. Accordingly, when the source address of a packet receivedfrom the WAN 152 is learned as a source address on a LAN side, the SW150#i according to the third embodiment determines that the packet is acirculating packet, and then discards the packet. It is to be noted thatthe third embodiment only takes the shape of a ring as an example of theshape of the WAN 152 that may cause a packet to circulate around, andtherefore the WAN 152 may of course be of another shape having a part inthe shape of a ring, for example.

FIG. 10 is a block diagram of an SW 150#i in FIG. 9. In the figure,substantially the same components as the components in FIG. 3 areidentified by the same reference numerals. FIG. 11 is a flowchart ofoperation of an SW unit 160#i in FIG. 10. The SW unit 160#i receives apacket from a LAN interface unit 70#ij or a WAN interface unit 72#il,and then performs the following processing. Processing of steps S100 toS104, steps S106 to S112, and steps S120 to S124 is the same asprocessing of the steps S2 to S6, the steps S8 to S12, and the steps S18to S22 in FIG. 4. At a step S105, the SW unit 160#i determines whetherthe source address of the packet has been learned as a source address onthe LAN side and the packet is received from the WAN 152. When thesource address of the packet has not been learned as a source address onthe LAN side or the packet is not received from the WAN 152, theprocessing proceeds to a step S106. When the source address of thepacket has been learned as a source address on the LAN side and thepacket is received from the WAN 152, the processing proceeds to a stepS116. At the step S116, the SW unit 160#i discards the packet. At a stepS114, the SW unit 160#i floods the WAN 152 side with the packet. In thiscase, the step S114 may be carried out after the step S14 in FIG. 4 iscarried out.

FIG. 12 is a flowchart of operation of a MAC address learning unit 162#iin FIG. 10. At a step S140, the MAC address learning unit 162#i receivesthe source address and an input port number. At a step S142, the MACaddress learning unit 162#i searches a MAC address table 78#i for thesource address. At a step S144, the MAC address learning unit 162#idetermines whether the MAC address has been learned. When the MACaddress has been learned, the processing proceeds to a step S146. Whenthe MAC address has not been learned, the processing proceeds to a stepS150. At the step S146, the MAC address learning unit 162#i determineswhether the source address of the packet has been learned as a sourceaddress on the LAN side and the input port of the packet is on the WAN152 side. When the source address of the packet has been learned as asource address on the LAN side and the input port of the packet is onthe WAN 152 side, the MAC address learning unit 162#i ends theprocessing without learning the source address. When the source addressof the packet has not been learned as a source address on the LAN sideor the input port of the packet is not on the WAN 152 side, theprocessing proceeds to a step S148. At the steps S148 and S150, the MACaddress learning unit 162#i registers the source address, the input portnumber, and a present time in the MAC address table 78#i.

Operation of FIG. 9 will be described in the following. Communicationwithin an office LAN 50#1 is the same as in the first embodiment, andtherefore its description will be omitted. Communication between theoffice LAN 50#1 and an office LAN 50#3 will be described. Suppose that aterminal 60#111 sends a packet having the MAC address of the terminal asa source address and the MAC address of a terminal 60#311 as adestination address to the office LAN 50#1. The LAN interface unit 70#11in the SW 150#1 receives the packet, and then outputs the packet to theSW unit 160#1. As the packet is received from the LAN side, the SW unit160#1 learns the source address of the packet, and searches the MACaddress table 78#1 for the destination address of the packet todetermine whether the destination address has been learned. Since theterminal 60#311 is not accommodated in the office LAN 50#1, the SW unit160#1 forwards the packet to the WAN 152 side. The packet forwarded tothe WAN 152 is received by the SW 150#4.

Since the packet is received from the WAN side but the source address ofthe packet is not learned as a source address on the LAN side, the SW150#4 learns the source address, and searches the MAC address table 78#4for the destination address of the packet to determine whether thedestination address has been learned. Since the terminal 60#311 is notaccommodated in an office LAN 50#4, the SW 150#4 forwards the packet tothe WAN 152 side. The packet forwarded to the WAN 152 is received by theSW 150#3. Since the packet is received from the WAN side but the sourceaddress of the packet is not learned as a source address on the LANside, the SW 150#3 learns the source address, and searches the MACaddress table 78#3 for the destination address of the packet todetermine whether the destination address has been learned. In thiscase, the terminal 60#311 is accommodated in an office LAN 50#3, andsuppose that the address of the terminal 60#311 has not been learned, sothat the office LAN 50#3 is flooded with the packet and also the packetis forwarded to the WAN 152 side. The packet forwarded to the WAN 152 isreceived by the SW 150#2. The SW 150#2 operates in the same manner asthe SW 150#4 to forward the packet to the WAN 152 side. The packetforwarded to the WAN 152 is received by the SW 150#1.

Since the packet is received from the WAN side and the source address ofthe packet is learned as a source address on the LAN side, the SW 150#1determines that the packet has circulated around. The SW 150#1 thereforedoes not learn the source address, and discards the packet. Thus, whenthe source address of the packet received from the WAN 152 side islearned as a source address on the LAN side, the packet is discarded,whereby an increase in the traffic of the WAN 152 due to the unnecessarycirculation of the packet is controlled. Incidentally, it is conceivablethat the terminal 60#111 is moved to be accommodated in another officeLAN. However, this presents no problem in operation because of a shorttime between when a packet is transmitted from the terminal 60#111 andwhen the packet circulates around, and because when the terminal 60#111is accommodated in another office LAN, aging once deletes the address ofthe terminal 60#111 from the MAC address table 78#1.

Fourth Embodiment

FIG. 13 is a diagram of a network configuration according to a fourthembodiment of the present invention. In the figure, substantially thesame components as the components in FIG. 9 are identified by the samereference numerals. The fourth embodiment is another example than thethird embodiment, the example which reduces the traffic of a WAN 152 bydiscarding a circulating packet. FIG. 14 is a block diagram of an SW200#i in FIG. 13. In the figure, substantially the same components asthe components in FIG. 3 are identified by the same reference numerals.FIG. 15 is a flowchart of operation of an SW unit 210#i in FIG. 14. TheSW unit 210#i receives a packet from a LAN interface unit 70#ij or a WANinterface unit 72#ij, and then performs the following processing.Processing of steps S200 to S204, steps S208 to S212, steps S220 toS222, and a step S228 is the same as processing of the steps S100 toS104, the steps S106 to S114, the steps S120 to S122, and the step S124in FIG. 11.

At a step S206, the SW unit 210#i receives a packet from the WAN 152side, and determines whether the source address and the destinationaddress of the packet are stored in a temporary memory table 212#i. Whenthe source address and the destination address of the packet are notstored in the temporary memory table 212#i, the processing proceeds to astep S208. When the source address and the destination address of thepacket are stored in the temporary memory table 212#i, the processingproceeds to a step S230. At a step S214, the SW unit 210#i determineswhether a packet is received from a LAN 50#i side. When the packet isreceived from the LAN 50#i side, the processing proceeds to a step S216.When the packet is not received from the LAN 50#i side, the processingis ended. At a step S216, the SW unit 210#i stores the source addressand the destination address of the packet and a present time in thetemporary memory table 212#i. At a step S224, the SW unit 210#idetermines whether the packet is received from the LAN 50#i and thepacket is forwarded to the WAN 152 side. When the packet is receivedfrom the LAN 50#i and the packet is forwarded to the WAN 152 side, theprocessing proceeds to a step S226. When the packet is not received fromthe LAN 50#i and the packet is not forwarded to the WAN 152 side, theprocessing is ended. At a step S226, the SW unit 210#i stores the sourceaddress and the destination address of the packet and a present time inthe temporary memory table 212#i.

Thus, the source address and the destination address of the packetreceived from the office LAN 50#i and forwarded to the WAN 152 side arestored in the temporary memory table 212#i. Packets stored in thetemporary memory table 212#i are limited to those received from the LAN50#i because when a series of packets having the same source address anddestination address is forwarded to the WAN 152, an SW that relays thepackets may discard a second and subsequent packets if the sourceaddresses and the destination addresses of packets received from the WAN152 are also stored in the temporary memory table 212#i.

At a step S230, the SW unit 210#i discards the packet. The packet isdiscarded because a packet whose source address and destination addressare stored in the temporary memory table 212#i can be considered to be acirculating packet. At a step S232, the SW unit 210#i deletes the sourceaddress and the destination address of the packet from the temporarymemory table 212#i. Also, the SW unit 210#i refers to the temporarymemory table 212#i and deletes from the temporary memory table 212#i apacket whose source address and destination address have beentemporarily stored for a certain period of time.

Operation of FIG. 13 will be described in the following. Communicationwithin the office LAN 50#1 is the same as in the first embodiment, andtherefore its description will be omitted. Communication between theoffice LAN 50#1 and the office LAN 50#3 will be described. Suppose thata terminal 60#111 sends a packet having the MAC address of the terminalas a source address and the MAC address of a terminal 60#311 as adestination address to the office LAN 50#1. The LAN interface unit 70#11in the SW 200#1 receives the packet, and then outputs the packet to theSW unit 210#1. The SW unit 210#1 learns the source address of thepacket, and searches a MAC address table 78#1 for the destinationaddress of the packet to determine whether the destination address hasbeen learned. Since the terminal 60#311 is not accommodated in theoffice LAN 50#1, the SW unit 210#1 forwards the packet to the WAN 152side. Since the packet is received from the LAN 50#1 in this case, theSW unit 210#1 stores the source address and the destination address ofthe packet and a present time in the temporary memory table 212#1. Thepacket forwarded to the WAN 152 is received by the SW 200#4.

The SW 200#4 learns the source address of the packet, and searches a MACaddress table 78#4 for the destination address of the packet todetermine whether the destination address has been learned. Since theterminal 60#311 is not accommodated in the office LAN 50#4, the SW 200#4forwards the packet to the WAN 152 side. The packet forwarded to the WAN152 is received by the SW 200#3. The SW 200#3 learns the source addressof the packet, and searches a MAC address table 78#3 for the destinationaddress of the packet to determine whether the destination address hasbeen learned. In this case, the terminal 60#311 is accommodated in theoffice LAN 50#3, and suppose that the address of the terminal 60#311 hasnot been learned, so that the office LAN 50#3 is flooded with the packetand also the packet is forwarded to the WAN 152 side. The packetforwarded to the WAN 152 is received by the SW 200#2. The SW 200#2operates in the same manner as the SW 200#4 to forward the packet to theWAN 152 side. The packet forwarded to the WAN 152 is received by the SW200#1.

Since the source address and the destination address of the packet arestored in the temporary memory table 212#1, the SW 200#1 determines thatthe packet has circulated around. The SW 200#1 therefore discards thepacket. Thus, when the source address and the destination address of thepacket received from the WAN 152 side are stored in the temporary memorytable 212#1, the packet is discarded, whereby an increase in the trafficof the WAN 152 due to the unnecessary circulation of the packet iscontrolled. The source address and the destination address stored in thetemporary memory table 212#1 are deleted when the circulating packet isdiscarded or when a certain time has passed. It is to be noted thatwhile the fourth embodiment determines whether a packet is a circulatingpacket on the basis of the source address and the destination address ofthe packet, whether a packet is a circulating packet may be determinedon the basis of a CRC set at the rear of a MAC frame.

Fifth Embodiment

FIG. 16 is a diagram of a network configuration according to a fifthembodiment of the present invention. In the figure, substantially thesame components as the components in FIG. 2 are identified by the samereference numerals. FIG. 17 is a block diagram of an SW 300#i in FIG.16. In the figure, substantially the same components as the componentsin FIG. 3 are identified by the same reference numerals. FIG. 18 is aflowchart of operation of an SW unit 310#i in FIG. 17. The SW unit 310#ireceives a packet from a LAN interface unit 70#ij or a WAN interfaceunit 72#ij, and then performs the following processing. Processing ofsteps S300 to S308, a step S320, and a step S328 is the same asprocessing of the steps S2 to S10, the step S18, and the step S22 inFIG. 4. At a step S310, the SW unit 310#i performs flooding or broadcastto a LAN 50#i side. At a step S312, the SW unit 310#i writes the packetto a broadcast/flooding buffer, and then the processing proceeds to astep S340.

At a step S322, the SW unit 310#i determines whether the output port ison a WAN 54 side. When the output port is on the WAN 54 side, theprocessing proceeds to a step S324. When the output port is on the LAN50#i side, the processing proceeds to a step S326. At the step S324, theSW unit 310#i writes the packet to a learned packet prioritizing buffer,and then the processing proceeds to a step S340. At the step S326, theSW unit 310#i forwards the packet to the LAN 50#i side. At the stepS340, the SW unit 310#i first reads a packet written in the learnedpacket prioritizing buffer before a packet is writtenin thebroadcast/flooding buffer, and then performs broadcast/flooding on theWAN 54 side. Not only packets for flooding but also broadcast packetsare not given priority because it may be considered that broadcastpackets are often used as control packets and are not required to have areal time characteristic as against normal packets that constitute realtraffic. Thus, learned normal packets are forwarded first to therebycontrol an increase in the traffic.

A learned packet prioritizing buffer 320#il is provided for each WANinterface unit 72#il, and stores a packet whose destination address hasbeen learned. A broadcast/flooding buffer 322#il is provided for eachWAN interface unit 72#il, and stores a packet for broadcast/floodingwhose destination address has not been learned. A reading control unit324#il reads a packet written in the learned packet prioritizing buffer320#il before a packet is written in the broadcast/flooding buffer322#il, in order to control an increase in the traffic to be caused by apacket for broadcast/flooding on the WAN 54 side.

Operation of FIG. 16 will be described in the following. Communicationwithin the office LAN 50#1 is the same as in the first embodiment, andtherefore its description will be omitted. Communication between theoffice LAN 50#1 and the office LAN 50#3 will be described. Suppose thata terminal 60#111 sends a packet having the MAC address of the terminalas a source address and the MAC address of a terminal 60#311 as adestination address to the office LAN 50#1. The LAN interface unit 70#11in the SW 300#1 receives the packet, and then outputs the packet to theSW unit 310#1. The SW unit 310#1 learns the source address of thepacket, and searches a MAC address table 78#1 for the destinationaddress of the packet to determine whether the destination address hasbeen learned.

When the destination address has been learned, the packet is written tothe learned packet prioritizing buffer provided for the WAN interfaceunit corresponding to the destination address, and then forwarded to theWAN 54 side before a packet is written in the broadcast/flooding buffer.When the destination address has not been learned, the packet is writtento the broadcast/flooding buffers provided for all WAN interface units,and then forwarded to the WAN 54 side after a packet is written in thelearned packet prioritizing buffers. Thus, a packet for flooding and apacket for broadcast used as a control packet are not given forwardingpriority. It is therefore possible to control an increase in the trafficof the WAN 54. The present invention described above can control anincrease in traffic due to flooding or broadcast on the WAN side.

The present invention is not limited to the details of the abovedescribed preferred embodiments. The scope of the invention is definedby the appended claims and all changes and modifications as fall withinthe equivalence of the scope of the claims are therefore to be embracedby the invention.

1. A packet switch for interfacing between a WAN and a LAN accommodatinga terminal, said packet switch comprising: a plurality of LAN interfaceunits for interfacing with said LAN; an address table for storing arelation between an address of the terminal and an input port receivinga packet transmitted from the terminal; an address learning unit forstoring in said address table the relation between the source address ofthe received packet and the input port receiving the received packet;and an SW unit for effecting control to receive a packet transmittedfrom a terminal accommodated in said LAN and received by a first LANinterface unit of said plurality of LAN interface units, and transmitthe received packet to a corresponding output port according to arelation between a destination address of the received packet and theinput port when the destination address is stored in said address table,and effecting control to transmit the received packet to the LAN throughall of the LAN interface units different from the first LAN interfaceunit when the destination address of the received packet is not storedin said address table, and then transmit the received packet to the WANwhen a packet having a source address identical with the destinationaddress of the received packet has not been received from the LAN in acertain time after transmitting the received packet to the LAN.
 2. Apacket switch as claimed in claim 1, further including a plurality ofoutput ports for interfacing the WAN, wherein when the received packetis transmitted to the WAN, said SW unit selects one of said plurality ofoutput ports and transmits the received packet from the selected outputport, and when a packet having a source address identical with thedestination address of the received packet has not been received fromthe WAN in a certain time after transmitting the received packet fromthe selected output port, said SW unit effects control to transmit thereceived packet from another output port connected to the WAN.
 3. Apacket switch for interfacing between a WAN and a LAN accommodating aterminal, said packet switch comprising: an address table for storing acorrespondence between an address of the terminal and an input portreceiving a packet transmitted from the terminal; an address learningunit for not storing in said address table a source address of a packetreceived from the WAN when the source address is stored in said addresstable and an input port corresponding to the source address is on theLAN side, and otherwise storing in said address table a relation betweena source address of a packet received from the LAN or the WAN and aninput port receiving the packet; an aging processing unit for deletingeach of the addresses from said address table when there has been noupdate relating to the address in a certain time; and an SW unit foreffecting control to transmit the packet received from the LAN side to acorresponding output port according to a relation between a destinationaddress of the packet and the input port when the destination address isstored in said address table, and discarding the packet received fromthe WAN side when the source address of the packet is stored in saidaddress table and the input port corresponding to the source address ofthe packet is on the LAN side.
 4. A packet switch for interfacingbetween a WAN and a LAN accommodating a terminal, said packet switchcomprising: an address table for storing a relation between an addressof the terminal and an input port receiving a packet transmitted fromthe terminal; an address learning unit for storing in said address tablea relation between a source address of a packet received from the LAN orthe WAN and an input port receiving the packet; a temporary storagememory; and an SW unit for effecting control to transmit the packet to acorresponding output port according to a relation between a destinationaddress of the packet and the input port when the destination address ofthe packet is stored in said address table, storing information on areceived packet received from the LAN in said temporary storage memorywhen the received packet is transmitted to the WAN, and discarding areceived packet received from the WAN side when information on thereceived packet coincides with the information stored in said temporarystorage memory.
 5. A packet switch as claimed in claim 4, wherein theinformation on the received packet is a source address and a destinationaddress of the received packet.
 6. A packet switch as claimed in claim4, wherein the information on the received packet is error-detectingdata of the received packet.
 7. A packet switch for interfacing betweena WAN and a LAN accommodating a terminal, said packet switch comprising:a plurality of LAN interface units for interfacing with said LAN; anaddress table for storing a relation between an address of the terminaland an input port receiving a packet transmitted from the terminal; anaddress learning unit for storing in said address table the relationbetween the source address of the received packet and the input portreceiving the received packet; a first buffer and a second buffer forstoring received packets received by said plurality of LAN interfaceunits provided for each of output ports connected to the WAN; an SW unitfor writing the received packet to said first buffer provided for theoutput port connected to the WAN side when a destination address of thereceived packet is stored in said address table and when a correspondingoutput port according to a relation between the destination address andthe input port is connected to the WAN side, and effecting control totransmit the received packet to the LAN through all of the LAN interfaceunits different from the LAN interface unit which has received thereceived packet and writing the received packet to said second bufferprovided for all of the output ports connected to the WAN side when thedestination address of the received packet is not stored in said addresstable; and a priority control unit for preferentially reading the packetwritten to said first buffer to reading the packet written to saidsecond buffer and transmitting the packet written to said first bufferto the WAN side.